// 中文学习英语的课程数据结构
// 包含中文题目，英文选项和答案
// 支持多种题型：翻译、选择、听力、语法填空、阅读理解
export const lessonsData = [
  {
    id: 1,
    title: "基础问候语",
    description: "学习英语的基本问候表达",
    difficulty: "初级",
    xp: 20,
    completed: false,
    exercises: [
      {
        id: 1,
        type: "translation", // 翻译题型：中文翻译成英文
        question: "'你好'用英语怎么说？",
        options: ["Hello", "Goodbye", "Thank you", "You're welcome"],
        correct: 0,
        translation: "Hello",
        explanation: "'你好'对应的英语是Hello，这是最常用的英语问候语"
      },
      {
        id: 2,
        type: "multiple_choice", // 选择题型：中文问题，英文选项
        question: "当你想和别人告别时，应该说什么？",
        options: ["Hello", "Goodbye", "Thank you", "Sorry"],
        correct: 1,
        explanation: "告别时应该说Goodbye，这是英语中标准的告别用语"
      },
      {
        id: 3,
        type: "translation",
        question: "'再见'的英语表达是什么？",
        options: ["Hello", "Goodbye", "Thank you", "Sorry"],
        correct: 1,
        translation: "Goodbye",
        explanation: "'再见'在英语中是Goodbye，也可以说Bye"
      },
      {
        id: 4,
        type: "listening", // 听力题型：播放中文，选择英文
        question: "听中文，选择对应的英语表达",
        audio: "nihao.mp3",
        audioText: "你好", // 播放的中文内容
        options: ["Hello", "Goodbye", "Thank you", "Sorry"],
        correct: 0,
        explanation: "听到的'你好'对应英语Hello"
      },
      {
        id: 5,
        type: "grammar_fill", // 语法填空：英语语法练习
        question: "完成英语问候语：_____ morning!",
        options: ["Good", "Bad", "Nice", "Happy"],
        correct: 0,
        explanation: "'Good morning'是标准的英语早晨问候语"
      },
      {
        id: 6,
        type: "multiple_choice",
        question: "当有人对你说'Thank you'时，你应该回答什么？",
        options: ["Hello", "Goodbye", "You're welcome", "Sorry"],
        correct: 2,
        explanation: "当别人说谢谢时，应该回答'You're welcome'（不客气）"
      },
      {
        id: 7,
        type: "translation",
        question: "'谢谢'用英语怎么表达？",
        options: ["Hello", "Goodbye", "Thank you", "Excuse me"],
        correct: 2,
        translation: "Thank you",
        explanation: "'谢谢'对应英语'Thank you'，也可以简单说'Thanks'"
      },
      {
        id: 8,
        type: "reading_comprehension", // 阅读理解：英语对话理解
        question: "阅读英语对话：A: Hello! B: Hi! Nice to meet you. A: Nice to meet you too.\n\n这个对话体现了什么场景？",
        options: ["Shopping", "Asking directions", "First meeting", "Saying goodbye"],
        correct: 2,
        explanation: "从'Nice to meet you'可以看出这是初次见面的场景"
      },
      {
        id: 9,
        type: "listening",
        question: "听中文，选择正确的英语回应",
        audioText: "谢谢你",
        options: ["You're welcome", "Goodbye", "Hello", "Sorry"],
        correct: 0,
        explanation: "当听到'谢谢你'时，英语应该回应'You're welcome'"
      },
      {
        id: 10,
        type: "grammar_fill",
        question: "完成英语对话：A: Hello! B: _____!",
        options: ["Hello", "Goodbye", "Thank you", "Sorry"],
        correct: 0,
        explanation: "当别人说Hello时，应该同样回应Hello"
      }
    ]
  },
  {
    id: 2,
    title: "数字1-10",
    description: "学习英语数字表达",
    difficulty: "初级",
    xp: 25,
    completed: false,
    exercises: [
      {
        id: 11,
        type: "translation",
        question: "数字'1'用英语怎么说？",
        options: ["One", "Two", "Three", "Four"],
        correct: 0,
        translation: "One",
        explanation: "数字1对应的英语是One"
      },
      {
        id: 12,
        type: "multiple_choice",
        question: "'Five'是数字几？",
        options: ["3", "4", "5", "6"],
        correct: 2,
        explanation: "'Five'对应数字5"
      },
      {
        id: 13,
        type: "translation",
        question: "数字'10'的英语表达是什么？",
        options: ["Eight", "Nine", "Ten", "Seven"],
        correct: 2,
        translation: "Ten",
        explanation: "数字10对应英语Ten"
      },
      {
        id: 14,
        type: "listening",
        question: "听中文数字，选择对应的英语",
        audio: "wu.mp3",
        audioText: "五",
        options: ["Three", "Four", "Five", "Six"],
        correct: 2,
        explanation: "听到的'五'对应英语Five"
      },
      {
        id: 15,
        type: "grammar_fill",
        question: "完成英语数字序列：One, Two, Three, _____, Five",
        options: ["Six", "Four", "Seven", "Eight"],
        correct: 1,
        explanation: "按顺序，Three后面应该是Four"
      },
      {
        id: 16,
        type: "multiple_choice",
        question: "下面哪个英语数字最大？",
        options: ["Three", "Seven", "Five", "Nine"],
        correct: 3,
        explanation: "在这四个数字中，Nine（9）是最大的"
      },
      {
        id: 17,
        type: "reading_comprehension",
        question: "阅读英语：Tom has three pens, Mary has five pens.\n\n问：他们一共有多少支笔？",
        options: ["Seven", "Eight", "Nine", "Ten"],
        correct: 1,
        explanation: "Three加Five等于Eight，所以一共有八支笔"
      },
      {
        id: 18,
        type: "translation",
        question: "数字'8'用英语怎么表达？",
        options: ["Six", "Seven", "Eight", "Nine"],
        correct: 2,
        translation: "Eight",
        explanation: "数字8对应英语Eight"
      },
      {
        id: 19,
        type: "grammar_fill",
        question: "完成英语句子：I have _____ apples.",
        options: ["three", "3", "third", "树"],
        correct: 0,
        explanation: "在英语句子中，数字应该用英语单词three"
      },
      {
        id: 20,
        type: "listening",
        question: "听中文数字序列，选择对应的英语",
        audioText: "一、二、三",
        options: ["One, Two, Three", "Three, Two, One", "Two, One, Three", "One, Three, Two"],
        correct: 0,
        explanation: "听到的顺序一、二、三对应One, Two, Three"
      }
    ]
  },
  {
    id: 3,
    title: "家庭成员",
    description: "学习家庭称谓词汇",
    difficulty: "初级",
    xp: 20,
    completed: false,
    exercises: [
      {
        id: 21,
        type: "translation", // 翻译题型：中文翻译成英文
        question: "'妈妈'用英语怎么说？",
        options: ["Mother", "Father", "Sister", "Brother"],
        correct: 0,
        translation: "Mother",
        explanation: "'妈妈'对应的英语是Mother，也可以说Mom"
      },
      {
        id: 22,
        type: "multiple_choice", // 选择题型：中文问题，英文选项
        question: "'Father'在中文里是什么意思？",
        options: ["妈妈", "爸爸", "姐姐", "弟弟"],
        correct: 1,
        explanation: "Father在中文里是'爸爸'的意思"
      },
      {
        id: 23,
        type: "translation", // 翻译题型
        question: "'姐姐'的英语表达是什么？",
        options: ["Mother", "Father", "Sister", "Brother"],
        correct: 2,
        translation: "Sister",
        explanation: "'姐姐'对应英语Sister，指年长的女性兄弟姐妹"
      },
      {
        id: 24,
        type: "listening", // 听力题型
        question: "听中文，选择对应的英语表达",
        audio: "baba.mp3",
        audioText: "爸爸",
        options: ["Mother", "Father", "Sister", "Brother"],
        correct: 1,
        explanation: "听到的'爸爸'对应英语Father"
      },
      {
        id: 25,
        type: "grammar_fill", // 语法填空
        question: "完成英语句子：My _____ is very kind.",
        options: ["mother", "mothers", "Mother", "MOTHER"],
        correct: 0,
        explanation: "在句子中mother应该小写，my mother表示我的妈妈"
      },
      {
        id: 26,
        type: "multiple_choice",
        question: "'Brother'指的是什么？",
        options: ["姐姐", "妹妹", "兄弟", "父母"],
        correct: 2,
        explanation: "Brother在中文里是'兄弟'的意思，指男性兄弟姐妹"
      },
      {
        id: 27,
        type: "translation",
        question: "'弟弟'用英语怎么表达？",
        options: ["Older brother", "Younger brother", "Sister", "Cousin"],
        correct: 1,
        translation: "Younger brother",
        explanation: "'弟弟'是年龄较小的男性兄弟，英语说Younger brother"
      },
      {
        id: 28,
        type: "reading_comprehension", // 阅读理解
        question: "阅读英语句子：This is my family. I have a mother, a father and a sister.\n\n这个人的家庭有几个成员？",
        options: ["Three", "Four", "Five", "Six"],
        correct: 1,
        explanation: "mother、father、sister加上'我'，一共四个家庭成员"
      },
      {
        id: 29,
        type: "listening",
        question: "听中文家庭称谓，选择英语表达",
        audioText: "妹妹",
        options: ["Older sister", "Younger sister", "Mother", "Daughter"],
        correct: 1,
        explanation: "'妹妹'是年龄较小的女性兄弟姐妹，英语说Younger sister"
      },
      {
        id: 30,
        type: "grammar_fill",
        question: "完成英语对话：A: Who is she? B: She is my _____.",
        options: ["sister", "brother", "father", "uncle"],
        correct: 0,
        explanation: "'She'表示女性，所以应该是sister（姐姐/妹妹）"
      }
    ]
  },
  {
    id: 4,
    title: "颜色",
    description: "学习基本颜色词汇",
    difficulty: "初级",
    xp: 15,
    completed: false,
    exercises: [
      {
        id: 31,
        type: "translation", // 翻译题型：中文翻译成英文
        question: "'红色'用英语怎么说？",
        options: ["Red", "Blue", "Green", "Yellow"],
        correct: 0,
        translation: "Red",
        explanation: "'红色'对应的英语是Red，象征热情和力量"
      },
      {
        id: 32,
        type: "multiple_choice", // 选择题型：中文问题，英文选项
        question: "'Blue'在中文里是什么颜色？",
        options: ["红色", "蓝色", "绿色", "黄色"],
        correct: 1,
        explanation: "Blue在中文里是'蓝色'，天空和海洋的颜色"
      },
      {
        id: 33,
        type: "listening", // 听力题型
        question: "听中文颜色，选择对应的英语",
        audio: "luse.mp3",
        audioText: "绿色",
        options: ["Red", "Blue", "Green", "Yellow"],
        correct: 2,
        explanation: "听到的'绿色'对应英语Green，代表自然和生命"
      },
      {
        id: 34,
        type: "translation",
        question: "'黄色'的英语表达是什么？",
        options: ["Red", "Blue", "Green", "Yellow"],
        correct: 3,
        translation: "Yellow",
        explanation: "'黄色'对应英语Yellow，太阳的颜色"
      },
      {
        id: 35,
        type: "grammar_fill", // 语法填空
        question: "完成英语句子：The sky is _____.",
        options: ["red", "blue", "green", "yellow"],
        correct: 1,
        explanation: "天空通常是蓝色的，所以用blue"
      },
      {
        id: 36,
        type: "multiple_choice",
        question: "'Purple'在中文里是什么意思？",
        options: ["紫色", "橙色", "粉色", "黑色"],
        correct: 0,
        explanation: "Purple在中文里是'紫色'的意思"
      },
      {
        id: 37,
        type: "reading_comprehension", // 阅读理解
        question: "阅读英语描述：I have a red car and a blue bike.\n\n这个人有什么颜色的交通工具？",
        options: ["Red and blue", "Green and yellow", "Black and white", "Purple and orange"],
        correct: 0,
        explanation: "从句子可知有红色汽车(red car)和蓝色自行车(blue bike)"
      },
      {
        id: 38,
        type: "translation",
        question: "'黑色'用英语怎么表达？",
        options: ["White", "Black", "Gray", "Brown"],
        correct: 1,
        translation: "Black",
        explanation: "'黑色'对应英语Black，代表深沉和神秘"
      },
      {
        id: 39,
        type: "listening",
        question: "听中文颜色组合，选择英语表达",
        audioText: "红色和白色",
        options: ["Red and white", "Blue and yellow", "Green and purple", "Black and gray"],
        correct: 0,
        explanation: "听到的'红色和白色'对应Red and white"
      },
      {
        id: 40,
        type: "grammar_fill",
        question: "完成英语对话：A: What color is it? B: It's _____.",
        options: ["color", "red", "colors", "Red"],
        correct: 1,
        explanation: "回答颜色时用小写的颜色词，如red、blue等"
      }
    ]
  },
  {
    id: 5,
    title: "食物和饮料",
    description: "学习食物相关词汇",
    difficulty: "中级",
    xp: 25,
    completed: false,
    exercises: [
      {
        id: 41,
        type: "translation", // 翻译题型：中文翻译成英文
        question: "'水'用英语怎么说？",
        options: ["Water", "Tea", "Coffee", "Milk"],
        correct: 0,
        translation: "Water",
        explanation: "'水'对应的英语是Water，生命之源"
      },
      {
        id: 42,
        type: "multiple_choice", // 选择题型：中文问题，英文选项
        question: "'Rice'在中文里是什么意思？",
        options: ["面条", "米饭", "面包", "汤"],
        correct: 1,
        explanation: "Rice在中文里是'米饭'的意思，亚洲人的主食"
      },
      {
        id: 43,
        type: "listening", // 听力题型
        question: "听中文饮料，选择对应的英语",
        audio: "cha.mp3",
        audioText: "茶",
        options: ["Water", "Tea", "Coffee", "Milk"],
        correct: 1,
        explanation: "听到的'茶'对应英语Tea，中国传统饮品"
      },
      {
        id: 44,
        type: "translation",
        question: "'面包'的英语表达是什么？",
        options: ["Rice", "Bread", "Noodles", "Cake"],
        correct: 1,
        translation: "Bread",
        explanation: "'面包'对应英语Bread，西方的主食之一"
      },
      {
        id: 45,
        type: "grammar_fill", // 语法填空
        question: "完成英语句子：I drink _____ every morning.",
        options: ["coffee", "Coffee", "coffees", "a coffee"],
        correct: 0,
        explanation: "在一般情况下coffee不可数，不加冠词和复数"
      },
      {
        id: 46,
        type: "multiple_choice",
        question: "'Milk'指的是什么？",
        options: ["水", "茶", "牛奶", "果汁"],
        correct: 2,
        explanation: "Milk在中文里是'牛奶'的意思"
      },
      {
        id: 47,
        type: "reading_comprehension", // 阅读理解
        question: "阅读英语菜单：Breakfast: Bread and coffee. Lunch: Rice and tea.\n\n早餐和午餐都有什么共同点？",
        options: ["Both have rice", "Both have drinks", "Both have bread", "Both have meat"],
        correct: 1,
        explanation: "早餐有coffee，午餐有tea，都有饮料(drinks)"
      },
      {
        id: 48,
        type: "translation",
        question: "'果汁'用英语怎么表达？",
        options: ["Water", "Juice", "Milk", "Soup"],
        correct: 1,
        translation: "Juice",
        explanation: "'果汁'对应英语Juice，由水果制成的饮品"
      },
      {
        id: 49,
        type: "listening",
        question: "听中文食物，选择英语表达",
        audioText: "苹果",
        options: ["Apple", "Orange", "Banana", "Grape"],
        correct: 0,
        explanation: "听到的'苹果'对应英语Apple"
      },
      {
        id: 50,
        type: "grammar_fill",
        question: "完成英语对话：A: What do you want to eat? B: I want some _____.",
        options: ["rice", "Rice", "rices", "a rice"],
        correct: 0,
        explanation: "rice不可数，不加冠词，用some rice表示一些米饭"
      }
    ]
  },
  // 新增课程：日常用品
  {
    id: 6,
    title: "日常用品",
    description: "学习日常生活用品词汇",
    difficulty: "初级",
    xp: 18,
    completed: false,
    exercises: [
      {
        id: 51,
        type: "translation", // 翻译题型：中文翻译成英文
        question: "'书'用英语怎么说？",
        options: ["Book", "Pen", "Table", "Chair"],
        correct: 0,
        translation: "Book",
        explanation: "'书'对应的英语是Book，我们学习知识的载体"
      },
      {
        id: 52,
        type: "multiple_choice", // 选择题型：中文问题，英文选项
        question: "'Pen'用来做什么？",
        options: ["吃饭", "写字", "睡觉", "走路"],
        correct: 1,
        explanation: "Pen（笔）是用来写字和画画的工具"
      },
      {
        id: 53,
        type: "translation",
        question: "'桌子'的英语表达是什么？",
        options: ["Chair", "Table", "Bed", "Door"],
        correct: 1,
        translation: "Table",
        explanation: "'桌子'对应英语Table，用来放置物品的家具"
      },
      {
        id: 54,
        type: "listening", // 听力题型
        question: "听中文物品，选择对应的英语",
        audioText: "笔",
        options: ["Book", "Pen", "Paper", "Bag"],
        correct: 1,
        explanation: "听到的'笔'对应英语Pen"
      },
      {
        id: 55,
        type: "grammar_fill", // 语法填空
        question: "完成英语句子：I write with a _____.",
        options: ["pen", "book", "table", "chair"],
        correct: 0,
        explanation: "写字用笔(pen)，这是基本常识"
      },
      {
        id: 56,
        type: "multiple_choice",
        question: "'Chair'指的是什么？",
        options: ["桌子", "椅子", "床", "门"],
        correct: 1,
        explanation: "Chair在中文里是'椅子'的意思"
      },
      {
        id: 57,
        type: "reading_comprehension", // 阅读理解
        question: "阅读英语句子：I put the book on the table and sit on the chair.\n\n这个人做了什么？",
        options: ["Reading", "Writing", "Sleeping", "Cooking"],
        correct: 0,
        explanation: "把书放在桌子上并坐在椅子上，这是阅读(Reading)的姿势"
      },
      {
        id: 58,
        type: "translation",
        question: "'纸'用英语怎么表达？",
        options: ["Paper", "Book", "Pen", "Bag"],
        correct: 0,
        translation: "Paper",
        explanation: "'纸'对应英语Paper，用来写字和画画"
      },
      {
        id: 59,
        type: "listening",
        question: "听中文物品组合，选择英语表达",
        audioText: "书和笔",
        options: ["Book and pen", "Table and chair", "Paper and bag", "Door and window"],
        correct: 0,
        explanation: "听到的'书和笔'对应Book and pen"
      },
      {
        id: 60,
        type: "grammar_fill",
        question: "完成英语对话：A: Where is the book? B: It's on the _____.",
        options: ["table", "chair", "pen", "paper"],
        correct: 0,
        explanation: "书通常放在桌子(table)上"
      }
    ]
  }
];

// 用户进度数据结构
// 记录用户的学习进度、经验值、等级和连续学习天数
export const userProgress = {
  totalXP: 0,                    // 总经验值
  currentStreak: 0,              // 当前连续学习天数
  longestStreak: 0,              // 最长连续学习天数
  lessonsCompleted: 0,           // 已完成课程数
  totalLessons: lessonsData.length, // 总课程数
  level: 1,                      // 当前等级
  lastStudyDate: null,           // 最后学习日期
  achievements: []               // 已获得成就列表
};

// 成就系统数据
// 定义各种学习成就和解锁条件，全部中文化并增加新的练习类型成就
export const achievements = [
  {
    id: 1,
    title: "首次尝试",
    description: "完成你的第一个课程",
    icon: "🎯",
    unlocked: false,
    requirement: "complete_lesson", // 解锁条件：完成课程
    value: 1                        // 需要完成的1个课程
  },
  {
    id: 2,
    title: "坚持不懈",
    description: "保持连续7天学习",
    icon: "🔥",
    unlocked: false,
    requirement: "streak",          // 解锁条件：连续学习
    value: 7                        // 需要连续7天
  },
  {
    id: 3,
    title: "经验大师",
    description: "获得100经验值",
    icon: "⭐",
    unlocked: false,
    requirement: "xp",              // 解锁条件：经验值
    value: 100                      // 需要100XP
  },
  {
    id: 4,
    title: "学习之星",
    description: "完成10个课程",
    icon: "📚",
    unlocked: false,
    requirement: "lessons_completed", // 解锁条件：完成课程数量
    value: 10                       // 需要完成10个课程
  },
  {
    id: 5,
    title: "持之以恒",
    description: "保持连续30天学习",
    icon: "🏆",
    unlocked: false,
    requirement: "streak",
    value: 30
  },
  {
    id: 6,
    title: "知识富翁",
    description: "获得500经验值",
    icon: "💫",
    unlocked: false,
    requirement: "xp",
    value: 500
  },
  {
    id: 7,
    title: "语法专家",
    description: "完成50道语法填空题",
    icon: "📝",
    unlocked: false,
    requirement: "grammar_exercises",
    value: 50
  },
  {
    id: 8,
    title: "阅读达人",
    description: "完成30道阅读理解题",
    icon: "📖",
    unlocked: false,
    requirement: "reading_exercises",
    value: 30
  },
  {
    id: 9,
    title: "听力高手",
    description: "完成100道听力练习",
    icon: "🎧",
    unlocked: false,
    requirement: "listening_exercises",
    value: 100
  },
  {
    id: 10,
    title: "翻译大师",
    description: "完成200道翻译题",
    icon: "🌍",
    unlocked: false,
    requirement: "translation_exercises",
    value: 200
  }
];